//
//  PlayerVideoViewController.h
//  网易公开课项目
//
//  Created by 林 艺 on 13-11-14.
//  Copyright (c) 2013年 Marklin. All rights reserved.
//

#import "BaseViewController.h"
#import <AVFoundation/AVFoundation.h>
#import "PlayView.h"
#import "CourseModel.h"
#import "CourseVideoModel.h"

typedef enum{
    PlayWithURL = 0,
    PlayWithLocal
}PlayType;

@interface PlayerVideoViewController : BaseViewController
{
    AVPlayerItem *_myMovie;
    AVPlayer *_myPlayer;
    
    NSTimer *_timer;
    NSTimer *_barTimer;
    PlayType _playFlag;
}


@property (weak, nonatomic) IBOutlet PlayView *playView;
@property (weak, nonatomic) IBOutlet UIView *controlView;
@property (weak, nonatomic) IBOutlet UILabel *leftLabel;
@property (weak, nonatomic) IBOutlet UILabel *rightLabel;
- (IBAction)playButtonClicked:(UIButton *)sender;
- (IBAction)playProgressSlid:(UISlider *)sender;
- (IBAction)backButtonClicked:(UIButton *)sender;
@property (weak, nonatomic) IBOutlet UISlider *playProgressSlider;

@property (weak, nonatomic) IBOutlet UILabel *topLabel;
@property (weak, nonatomic) IBOutlet UIView *topView;
@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *loadingAIV;
@property (weak, nonatomic) IBOutlet UILabel *middleTitleLabel;
@property (weak, nonatomic) IBOutlet UIView *backView;
@property (weak, nonatomic) IBOutlet UIButton *playButton;
@property (nonatomic, retain)CourseModel *courseModel;
@property (nonatomic, retain)CourseVideoModel *videoModel;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil withPlayType:(PlayType)playFlag;


@end
